<?php

namespace app\controller\admin;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;

use think\Request;

class TestController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    public function __construct()
    {
        // $this->middleware('jwtauth.admin');
    }

    /**
     * 获取资源列表
     */
    public function index(Request $request)
    {
        $action = $request->param('a');
        switch ($action) {
            case 'sitemap':
                return $this->siteMap();
                break;
            default:
                break;
        }
    }

    public function siteMap()
    {
        $data=[

        ];
        return <<<htmlstr
        <!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="UTF-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>网站导航</title>
            <style>
                a {text-decoration: none;}
            </style>
        </head>
        <body>
            <ul>
                <li><a href="/admin/login.html?demo=yes" target="_blank">登录通用后台</a></li>
            </ul>
        </body>
        </html>
        htmlstr;
    }
}
